
<!DOCTYPE html>
<html>
  <head>
        <title>财付通接口MD5签名测试</title>
		<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js"></script>
    
<style>
  body { margin:0;padding:0;background:#eae9e6; }
  body,p,table,td,th { font-size:14px;font-family:helvetica,Arial,Tahoma; }
  h1 { font-family:Baskerville,HelveticaNeue-Bold,helvetica,Arial,Tahoma; }
  a { text-decoration:none;color:#385487;}
</style>

<script>
function md5_1(){
	var temp=document.form2.md5string.value;
	var result="" + CryptoJS.MD5(temp);
	document.getElementById("md5string").innerHTML=HTMLEncode(temp);
	document.getElementById("md5result1").innerHTML=result.toUpperCase();
	document.getElementById("md5result2").innerHTML=result;
	document.getElementById( "MD5_2").style.display= "block";
	document.getElementById( "MD5_3").style.display= "block";
}

function HTMLEncode(html)
{
var temp = document.createElement ("div");
(temp.textContent != null) ? (temp.textContent = html) : (temp.innerText = html);
var output = temp.innerHTML;
temp = null;
return output;
}
</script>
</head>
<body>

	
<form name="form2" target="_blank">
<table width="317" border="1">
  <TR><th width="104">原串</th> 
  <th width="210"><INPUT value="" name="md5string" id="11"></th>
</table>
</form>
<div id="MD5_1">
	<a id="sha1send" href="javascript:md5_1();"><h1 class="title">MD签名</h1></a>
</div>	
  
<div id="MD5_2" style="display:none">
	<h1 class="title"><div style="color:#FF0000">MD5前字符串：</div></h1>
	<h1 class="title"><div id="md5string" style="width:800px;word-break:break-all;"></div></h1>
</div>	

<div id="MD5_3" style="display:none">
	<h1 class="title"><div style="color:#FF0000">MD5后结果：</div></h1>
	<h1 class="title"><div style="color:#FF0000">大写：</div></h1>
	<h1 class="title"><span id="md5result1"></span></h1>
	<h1 class="title"><div style="color:#FF0000">小写：</div></h1>
	<h1 class="title"><span id="md5result2"></span></h1>
</div>	

</body>
</html>